<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>emp-toolkit: /Users/wangxiao/git/emp-toolkit/emp-input-validity/bench/bench_input-check.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo-full-doxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">emp-toolkit
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('bench__input-check_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">bench_input-check.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="bench__input-check_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="emp-tool_8h.html">emp-tool/emp-tool.h</a>&gt;</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="iv_8h.html">input-validity/iv.h</a>&quot;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno"><a class="line" href="bench__input-check_8h.html#a0cd85dfd60ac13219f83c87e4cb88829">    4</a></span>&#160;<span class="keywordtype">double</span> <a class="code" href="bench__input-check_8h.html#a0cd85dfd60ac13219f83c87e4cb88829">bench_iv</a>(<span class="keywordtype">void</span> * f1, <span class="keywordtype">void</span> * f2, <span class="keywordtype">void</span>* g, uint64_t len1, uint64_t len2, uint64_t len3, <a class="code" href="class_net_i_o.html">NetIO</a> * io, uint64_t TIME, uint64_t <a class="code" href="input-check-malicious_8cpp.html#aefdd5aa9f02e7cb8d21ea22b0e6b03df">party</a>) {</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;    <span class="keywordtype">double</span> t = 0;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;    <span class="keywordtype">double</span> t1 = <a class="code" href="utils_8h.html#ac07ede322f50567d253ac432712e9be3">wallClock</a>();</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;    <span class="keywordflow">for</span>(uint64_t k = 0; k &lt; TIME; ++k) {</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;        <span class="keywordflow">if</span> (party == <a class="code" href="utils_8h.html#a856092a6a37aac1b54145ea9e3e03364">ALICE</a>) {</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;            <span class="keywordtype">bool</span> * b = <span class="keyword">new</span> <span class="keywordtype">bool</span>[len1];</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;            <span class="keywordflow">for</span>(uint64_t i = 0; i &lt; len1; ++i)</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;                b[i] = <span class="keyword">true</span>;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;            io-&gt;<a class="code" href="class_net_i_o.html#a583679fb7ff58c74375cfb30f457ab45">set_nodelay</a>();</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;            <a class="code" href="class_i_v.html">IV</a> iv(io, party, len1, len2, len3);</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;            iv.<a class="code" href="class_i_v.html#a31459cdb07d35917d5a638f178223f27">checkf1Alice</a>(b, f1);</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;            iv.<a class="code" href="class_i_v.html#a0950fba167def6206d76a6a1123c2e04">checkf2Alice</a>(f2);</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;            io-&gt;<a class="code" href="class_net_i_o.html#a61981ac0d4d91a96884e0c30999137ff">set_delay</a>();</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;            iv.<a class="code" href="class_i_v.html#af883d73bb1704cf5366c378a821aae6f">evalgAlice</a>(g);</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;            <span class="keyword">delete</span> []b;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;        }</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        <span class="keywordflow">else</span> {</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;            <span class="keywordtype">bool</span> * b = <span class="keyword">new</span> <span class="keywordtype">bool</span>[len2];</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;            <span class="keywordflow">for</span>(uint64_t i = 0; i &lt; len2; ++i)</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;                b[i] = <span class="keyword">true</span>;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;            <span class="keywordtype">bool</span> * output = <span class="keyword">new</span> <span class="keywordtype">bool</span>[len3];</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;            <a class="code" href="class_i_v.html">IV</a> iv(io, party, len1, len2, len3);</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;            io-&gt;<a class="code" href="class_net_i_o.html#a583679fb7ff58c74375cfb30f457ab45">set_nodelay</a>();</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;            iv.<a class="code" href="class_i_v.html#acf5add7b42b2d545e90a5cf9944cf82b">checkf1Bob</a>(f1);</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;            iv.<a class="code" href="class_i_v.html#a356c96812187ce0d4bd1db17a4bbf1d1">checkf2Bob</a>(b, f2);</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;            io-&gt;<a class="code" href="class_net_i_o.html#a61981ac0d4d91a96884e0c30999137ff">set_delay</a>();</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;            iv.<a class="code" href="class_i_v.html#a681882103d789ec7d353d41ded7ca176">evalgBob</a>(g, output);</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;            <span class="keyword">delete</span> []b;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;            <span class="keyword">delete</span>[] output;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        }</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    }</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;            <span class="keywordtype">double</span> t4 = <a class="code" href="utils_8h.html#ac07ede322f50567d253ac432712e9be3">wallClock</a>();</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;            t+=(t4-t1);</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <span class="keywordflow">return</span> t/TIME;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;}</div><div class="ttc" id="iv_8h_html"><div class="ttname"><a href="iv_8h.html">iv.h</a></div></div>
<div class="ttc" id="utils_8h_html_ac07ede322f50567d253ac432712e9be3"><div class="ttname"><a href="utils_8h.html#ac07ede322f50567d253ac432712e9be3">wallClock</a></div><div class="ttdeci">double wallClock()</div><div class="ttdef"><b>Definition:</b> utils.hpp:49</div></div>
<div class="ttc" id="class_i_v_html_acf5add7b42b2d545e90a5cf9944cf82b"><div class="ttname"><a href="class_i_v.html#acf5add7b42b2d545e90a5cf9944cf82b">IV::checkf1Bob</a></div><div class="ttdeci">bool checkf1Bob(void *f)</div><div class="ttdef"><b>Definition:</b> iv.h:414</div></div>
<div class="ttc" id="class_i_v_html_a0950fba167def6206d76a6a1123c2e04"><div class="ttname"><a href="class_i_v.html#a0950fba167def6206d76a6a1123c2e04">IV::checkf2Alice</a></div><div class="ttdeci">bool checkf2Alice(void *f)</div><div class="ttdef"><b>Definition:</b> iv.h:530</div></div>
<div class="ttc" id="class_net_i_o_html"><div class="ttname"><a href="class_net_i_o.html">NetIO</a></div><div class="ttdef"><b>Definition:</b> net_io_channel.h:22</div></div>
<div class="ttc" id="class_i_v_html"><div class="ttname"><a href="class_i_v.html">IV</a></div><div class="ttdef"><b>Definition:</b> iv.h:7</div></div>
<div class="ttc" id="class_i_v_html_a31459cdb07d35917d5a638f178223f27"><div class="ttname"><a href="class_i_v.html#a31459cdb07d35917d5a638f178223f27">IV::checkf1Alice</a></div><div class="ttdeci">bool checkf1Alice(bool *b, void *f)</div><div class="ttdef"><b>Definition:</b> iv.h:463</div></div>
<div class="ttc" id="class_i_v_html_af883d73bb1704cf5366c378a821aae6f"><div class="ttname"><a href="class_i_v.html#af883d73bb1704cf5366c378a821aae6f">IV::evalgAlice</a></div><div class="ttdeci">bool evalgAlice(void *f)</div><div class="ttdef"><b>Definition:</b> iv.h:121</div></div>
<div class="ttc" id="class_i_v_html_a681882103d789ec7d353d41ded7ca176"><div class="ttname"><a href="class_i_v.html#a681882103d789ec7d353d41ded7ca176">IV::evalgBob</a></div><div class="ttdeci">bool evalgBob(void *f, bool *output)</div><div class="ttdef"><b>Definition:</b> iv.h:229</div></div>
<div class="ttc" id="utils_8h_html_a856092a6a37aac1b54145ea9e3e03364"><div class="ttname"><a href="utils_8h.html#a856092a6a37aac1b54145ea9e3e03364">ALICE</a></div><div class="ttdeci">#define ALICE</div><div class="ttdef"><b>Definition:</b> utils.h:15</div></div>
<div class="ttc" id="class_net_i_o_html_a61981ac0d4d91a96884e0c30999137ff"><div class="ttname"><a href="class_net_i_o.html#a61981ac0d4d91a96884e0c30999137ff">NetIO::set_delay</a></div><div class="ttdeci">void set_delay()</div><div class="ttdef"><b>Definition:</b> net_io_channel.h:89</div></div>
<div class="ttc" id="class_net_i_o_html_a583679fb7ff58c74375cfb30f457ab45"><div class="ttname"><a href="class_net_i_o.html#a583679fb7ff58c74375cfb30f457ab45">NetIO::set_nodelay</a></div><div class="ttdeci">void set_nodelay()</div><div class="ttdef"><b>Definition:</b> net_io_channel.h:84</div></div>
<div class="ttc" id="input-check-malicious_8cpp_html_aefdd5aa9f02e7cb8d21ea22b0e6b03df"><div class="ttname"><a href="input-check-malicious_8cpp.html#aefdd5aa9f02e7cb8d21ea22b0e6b03df">party</a></div><div class="ttdeci">int party</div><div class="ttdef"><b>Definition:</b> input-check-malicious.cpp:12</div></div>
<div class="ttc" id="bench__input-check_8h_html_a0cd85dfd60ac13219f83c87e4cb88829"><div class="ttname"><a href="bench__input-check_8h.html#a0cd85dfd60ac13219f83c87e4cb88829">bench_iv</a></div><div class="ttdeci">double bench_iv(void *f1, void *f2, void *g, uint64_t len1, uint64_t len2, uint64_t len3, NetIO *io, uint64_t TIME, uint64_t party)</div><div class="ttdef"><b>Definition:</b> bench_input-check.h:4</div></div>
<div class="ttc" id="emp-tool_8h_html"><div class="ttname"><a href="emp-tool_8h.html">emp-tool.h</a></div></div>
<div class="ttc" id="class_i_v_html_a356c96812187ce0d4bd1db17a4bbf1d1"><div class="ttname"><a href="class_i_v.html#a356c96812187ce0d4bd1db17a4bbf1d1">IV::checkf2Bob</a></div><div class="ttdeci">bool checkf2Bob(bool *b, void *f)</div><div class="ttdef"><b>Definition:</b> iv.h:565</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_a27d30adcb009e917fb5e1bf5d93fdaa.html">emp-input-validity</a></li><li class="navelem"><a class="el" href="dir_2a6d781984ce253abd9947aac7ce342a.html">bench</a></li><li class="navelem"><a class="el" href="bench__input-check_8h.html">bench_input-check.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
